home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_inf_puzzlevator.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
3KB
|
104 lines
# Jones 3D Cog Script
#
# INF_ChapelDoor.cog
#
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ========================================================================================
symbols
message startup
message blocked
message entered
keyframe in_pull=in_pull_lever_down.key local
keyframe lever_down=gen_lever.key local
keyframe elevanim=inf_elvtr_gears.key local
keyframe elevanimup=inf_elvtr_gearup.key local
sound leverpull=nub_lever_pull_c.wav local
sound leverback=nub_lever_reset_c.wav local
sound gearplatmove=nub_weight_move_c.wav local
sound gearplatstart=nub_elev_start_c.wav local
sound gearplatstop=nub_elev_stop_c.wav local
surface upvatorsurf0
surface upvatorsurf1
thing player local
thing camera
thing camera_tgt0
thing elevator
thing elevator_cap
thing waypoint0
thing waypoint1
int keychan local
int movechan local
int startchan local
int screen=0 local
int checkit=0 local
end
# ================================================================================
code
# ................................................................................
startup:
AttachThingToThing(elevator_cap, elevator);
AISetMoveSpeed(elevator, 0.65);
AISetMoveFrame(elevator, 2);
player = GetLocalPlayerThing();
SetCollideType(elevator, 0);
ClearThingFlags(elevator, 0x80000);
return;
# ................................................................................
entered:
if ((GetSenderRef() == elevator_cap) && (checkit == 0))
{
checkit = 1;
ClearAdjoinFlags(upvatorsurf0, 0x2);
ClearAdjoinFlags(upvatorsurf1, 0x2);
Sleep(0.5);
startchan=PlaySoundThing(gearplatstart, elevator, 1, 10, 20, 0x0080);
WaitForSound(startchan);
AISetMoveSpeed(elevator, 0.65);
AISetMoveFrame(elevator, 0);
keychan = PlayKey(elevator, elevanim, 2, 0x00, 0);
movechan = PlaySoundThing(gearplatmove, elevator, 1, 5, 10, 0x0081);
AIWaitForStop(elevator);
SetAdjoinFlags(upvatorsurf0, 0x2);
SetAdjoinFlags(upvatorsurf1, 0x2);
StopKey(elevator, keychan, 0.2);
StopSound(movechan, 0);
PlaySoundThing(gearplatstop, elevator, 1, 10, 20, 0x0080);
}
return;
# ................................................................................
blocked:
//print("I'm blocked");
return;
# ................................................................................
end